<!DOCTYPE html>
<html>
<head>
    <title>消息桥接</title>
    <script>
    // 创建广播频道
    const channel = new BroadcastChannel('cross_domain_channel');
    
    // 监听来自父窗口的消息
    window.addEventListener('message', (event) => {
        if (event.data.type === 'broadcast') {
            // 通过BroadcastChannel广播消息
            channel.postMessage({
                type: 'notification',
                message: event.data.message
            });
        }
    });
    
    // 监听来自其他iframe的消息
    channel.addEventListener('message', (event) => {
        // 转发给父窗口
        window.parent.postMessage(event.data, '*');
    });
    </script>
</head>
<body>
<!-- 空页面 -->
</body>
</html>